package May;

import java.net.ServerSocket;
import java.net.Socket;
//https://blog.csdn.net/qq_16949707/article/details/79042455
public class ServerTcp {
    public static void main(String []args){
        try{
            ServerSocket ss=new ServerSocket(6321);
            while(true)
            {
                Socket server=ss.accept();
                System.out.println("接受信息");

                Thread t=new Thread(new ThreadReader(server));
                t.start();
                Thread t2=new Thread(new ThreadWriter(server));
                t2.start();
            }

        }catch(Exception e){
            e.printStackTrace();
        }
    }
}
